import { _decorator, Component, director, EventTouch, Node } from 'cc';
import { GameManager } from './GameManager';
const { ccclass, property } = _decorator;

@ccclass('MenuManager')
export class MenuManager extends Component {

    private _isClick: boolean = false;
    OnButtonClick(target: EventTouch) {
        if (this._isClick) return;
        this._isClick = true;

        // GameManager.Level = "level" + target.getCurrentTarget().name;
        GameManager.Level = Number(target.getCurrentTarget().name) - 1;
        director.loadScene("game");
    }
}


